<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(course,index) in courses" :key="index">
                {{index}} 、课程：{{course.name}}
                <ul>
                    <li v-for="(chapter,idx) in course.chapters" :key="idx">
                        {{idx}} 、章节：{{chapter.name}} 课时：{{chapter.lesson}}
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                courses: [
                    {
                        name: "前端框架入门",
                        chapters: [
                            {name: "Vue.js", lesson: 4},
                            {name: "React.js", lesson: 8},
                            {name: "Angular.js", lesson: 16}
                        ]
                    },
                    {
                        name: "后端框架入门",
                        chapters: [
                            {name: "MyBatis", lesson: 8},
                            {name: "Spring", lesson: 8},
                            {name: "SpringMVC", lesson: 16}
                        ]
                    }
                ]
            }
        });
    </script>
</body>
</html>